<?php

$app->group('/api/v1',function(){
    $this->post('/login','\App\Controllers\AuthController:login');
    $jwtMiddleware = $this->getContainer()->get('jwt');

    $this->get('/access/navlist','\App\Controllers\AccessController:getNavlist')->add($jwtMiddleware);
    $this->get('/access/btnlist','\App\Controllers\AccessController:getBtnlist')->add($jwtMiddleware);

    $this->post('/user/getPagingList','\App\Controllers\UserController:index')->add($jwtMiddleware);
    $this->post('/user/store','\App\Controllers\UserController:store')->add($jwtMiddleware);
    $this->post('/user/delete','\App\Controllers\UserController:delete')->add($jwtMiddleware);
    $this->post('/user/statusChange','\App\Controllers\UserController:userStatusChange')->add($jwtMiddleware);

    $this->get('/group/optionslist','\App\Controllers\GroupController:getOptionList')->add($jwtMiddleware);
    $this->post('/group/groupList','\App\Controllers\GroupController:groupList')->add($jwtMiddleware);
    $this->post('/group/store','\App\Controllers\GroupController:groupStore')->add($jwtMiddleware);
    $this->post('/group/delete','\App\Controllers\GroupController:groupDelete')->add($jwtMiddleware);

    $this->get('/role/optionslist','\App\Controllers\RoleController:getOptionList')->add($jwtMiddleware);
    $this->post('/role/roleList','\App\Controllers\RoleController:getRoleList')->add($jwtMiddleware);
    $this->post('/role/store','\App\Controllers\RoleController:roleStore')->add($jwtMiddleware);
    $this->post('/role/delete','\App\Controllers\RoleController:roleDelete')->add($jwtMiddleware);

    $this->post('/access/roleNodelist','\App\Controllers\AccessController:getRoleNodelist')->add($jwtMiddleware);
    $this->post('/access/roleNodeSave','\App\Controllers\AccessController:roleNodeStore')->add($jwtMiddleware);

    $this->post('/node/nodeList','\App\Controllers\NodeController:nodeList')->add($jwtMiddleware);
    $this->post('/node/store','\App\Controllers\NodeController:nodeStore')->add($jwtMiddleware);
    $this->post('/node/delete','\App\Controllers\NodeController:nodeDelete')->add($jwtMiddleware);
});